<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>
<script>

import {Token} from "./api/User"

export default ({
    mounted() {
      this.token()
    },

    methods:{
       async token(){
            let {data} = await Token()
            if(data.code==200){
               this.$store.commit("AlteruserName",data.data.user)
               this.$store.commit("alterIsToken",true)
            }else{
                localStorage.removeItem("token")
            }
           
        },
    }

})
</script>


<style lang="scss">

 @import "./assets/base.css";
  #app{
    width: 100%;
    height: 100%;
  }
</style>
